package com.zzx.demo.service;

import java.lang.reflect.Method;
import java.util.HashMap;
import java.util.Map;

import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.BeanFactoryAware;

import com.zzx.api.IDemoService;

public class DemoServiceImpl implements IDemoService,BeanFactoryAware{
	
	private BeanFactory factory;
	public void setBeanFactory(BeanFactory factory) {
		this.factory = factory;
	}

	
	@Override
	public String rtnTest(String str) {
		System.err.println("******snscore 层代码： start********");
		String str2 = null;	    		
		try {
			Object object = factory.getBean("testService");
			Method mth = object.getClass().getMethod("queryUserList", Map.class);
			Map<String,String> map = new HashMap<String,String>();
			mth.invoke(object, map );
		} catch (Exception e) {
			System.err.println("错误22"+e);
		}
	    		
		System.err.println("******snscore 层代码： end********");
		return "** snscore 层返回:"+str;
	}

}
